

// 引入 request 文件
import request from '@/utils/request'
import type { PhoneLoginParams, WxLoginParams, TakeCode, PrivacyPolicy } from "./types"

//手机号登录
export const phoneLogin = (params : PhoneLoginParams) => {
	return request({
		url: '/system/wx/simlogin',
		method: 'get',
		data: params
	})
}

//微信一键登录
export const wxLogin = (params : WxLoginParams) => {
	return request({
		url: '/system/wx/login',
		method: 'get',
		data: params
	})
}

//发送短信验证码
export const takeCode = (params : TakeCode) => {
	return request({
		url: '/valid/code/create',
		method: 'post',
		data: params
	})
}

//隐私协议
export const getPrivacyPolicy = (params: PrivacyPolicy) => {
	return request({
		url: '/cloud/protocol/detail',
		method: 'get',
		data: params
	})
}
